///>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
//----------Indication de localit�
///>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

if (local serveur) then
{

///>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
//----------VARIABLES
///>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

_random_pluie = 0 ;
_random_brume = 0 ;

///>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
//----------FONCTIONS - PROCEDURES
///>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

///>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
//----------CONSTANTES
///>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

//_attente = 260 ; 4 minutes 20 secs
//_degre = 0.1 ;
attente = 260 ;
publicvariable "attente" ;
_degre = 0.1 ;


///>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
//----------DEBUT PROGRAMME
///>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
while {true} do
					{
///>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
//----------COEUR PROGRAMME
///>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

						_random_pluie = (random 10);
						_random_brume = (random 10);
						sleep attente ;
						changement_temps = false ;
						publicvariable "changement_temps";
						if (pluie>0.7) then
												{
													if (_random_pluie < 6) then {pluie = pluie-_degre};
													if ((_random_pluie >=6) and (_random_pluie <=9)) then {pluie = pluie+_degre};
												};
						if (brume>0.7) then
												{
													if (_random_brume < 6) then {brume = brume-_degre};
													if ((_random_brume >=6) and (_random_brume <=9)) then {brume = pluie+_degre};
												};
						if ((pluie<=0.7) and (pluie>0.3)) then
												{
													if (_random_pluie < 5) then {pluie = pluie-_degre};
													if (_random_pluie >=5) then {pluie = pluie+_degre};
												};
						if ((brume<=0.7) and (brume>0.3)) then
												{
													if (_random_brume < 5) then {brume = brume-_degre};
													if (_random_pluie >=5) then {brume = brume+_degre};
												};
						if (pluie<=0.3) then
												{
													if (_random_pluie < 6) then {pluie = pluie+_degre};
													if ((_random_pluie >=6) and (_random_pluie <=9)) then {pluie = pluie-_degre};
												};
						if (brume<=0.3) then
												{
													if (_random_brume < 6) then {brume = brume+_degre};
													if ((_random_brume >=6) and (_random_brume <=9)) then {brume = pluie-_degre};
												};
												
						if (brume<0) then {brume = 0}; if (brume>1) then {brume = 1};
						if (pluie<0) then {pluie = 0}; if (pluie>1) then {pluie = 1};
						


///>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
//----------FIN PROGRAMME
///>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

// il faut sortir du serveur pour que les changements climatiques soient appliqués à tous les joueurs, donc repasser sur la map
					sleep 10 ;
					publicVariable "brume" ;
					publicVariable "pluie" ;
					
					changement_temps = true ;
					publicVariable "changement_temps" ;

					};

				
///>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
//----------Fin de localit�
///>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

};
if (true) exitWith {};